package cn.hf.mychat.config;

import org.springframework.boot.context.properties.ConfigurationProperties;
import org.springframework.context.ApplicationContext;
import org.springframework.context.annotation.AnnotationConfigApplicationContext;
import org.springframework.stereotype.Component;

//@ConfigurationProperties(prefix = "test", ignoreUnknownFields = false)
public class ConfigurationTest1 {
    private String name = "";
    private Integer password ;

    public String getName() {
        return name;
    }

    public void setName(String name) {
        this.name = name;
    }

    public Integer getPassword() {
        return password;
    }

    public void setPassword(Integer password) {
        this.password = password;
    }

    @Override
    public String toString() {
        return "ConfigurationTest1{" +
                "name='" + name + '\'' +
                ", password=" + password +
                '}';
    }
   /* public static void main(String[] args) {
        //spring=默认加载的spring容器的类
        // 用AnnotationConfigApplicationContext替换ClassPathXmlApplicationContext
        ApplicationContext context = new AnnotationConfigApplicationContext(ConfigurationTest.class);
    }*/

}
